package com.buka.communicate.activity;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;
import android.widget.EditText;

import com.buka.communicate.R;
import com.buka.communicate.adapter.PraiseHeadAdapter;
import com.buka.communicate.adapter.PublishImgAdapter;
import com.buka.communicate.views.MyRecylerView;

import net.neiquan.applibrary.base.BaseActivity;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by Administrator on 2017/11/17 0017.
 */

public class PublishCircleActivity extends BaseActivity {
    @InjectView(R.id.mContentET)
    EditText mContentET;
    @InjectView(R.id.mRecylerView)
    MyRecylerView mRecylerView;

    @Override
    public int getRootViewId() {
        return R.layout.activity_circle_publish;
    }

    @Override
    public void setViews() {
        setTitleTv("我的圈子");
        setNextTv("发布");
        getNextTv().setTextColor(getResources().getColor(R.color.app_color));
        setNextOnClick(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

            }
        });
        initRecylerView();
    }

    private void initRecylerView() {
        StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3,
                StaggeredGridLayoutManager.VERTICAL);
        layoutManager.setOrientation(StaggeredGridLayoutManager.VERTICAL);
        mRecylerView.setLayoutManager(layoutManager);
        mRecylerView.setAdapter(new PublishImgAdapter(this, null));
        mRecylerView.setNestedScrollingEnabled(false);
    }

    @Override
    public void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.inject(this);
    }
}
